package com.angel.entity;

import java.io.Serializable;
import java.io.Serializable;

import com.angel.entity.bean.Activity;
import com.angel.util.MyDateFormat;

/**
 * 返回到Android端的活动实体(持久化实体的一部分字段，相当于适配器)
 * @author xiaolong
 *
 */
public class ActivityBean implements Serializable {
	private static final long serialVersionUID = 7191007303231904628L;
	// 活动id
	private String activityId;
	// 活动标题
	private String mainActivityTitle;
	// 活动主图片
	private String mainActivityImgUrl;
	// 活动类型
	private String mainActivitytype;
	// 活动时间
	private String mainActivityTime;
	// 活动地址
	private String mainActivityAddress;
	// 参加人数
	private String activityPartipateNum;
	// 感兴趣人数
	private String activityInterestNum;

	public ActivityBean() {

	}

	public ActivityBean(Activity activity) {
		this.activityId = activity.getId() + "";
		this.mainActivityTitle = activity.getTitle();
		this.mainActivityImgUrl = activity.getMainImage();
		this.mainActivitytype = activity.getType().getName();
		this.mainActivityTime = MyDateFormat.format("MM/dd HH:mm", activity.getStartTime()) + " - " + MyDateFormat.format("HH:MM", activity.getEndTime());
		this.mainActivityAddress = activity.getAddress();
		this.activityPartipateNum = activity.getPartipateNum() + "";
		this.activityInterestNum = activity.getInterestNum() + "";
	}

	public String getActivityId() {
		return activityId;
	}

	public void setActivityId(String activityId) {
		this.activityId = activityId;
	}

	public String getMainActivityTitle() {
		return mainActivityTitle;
	}

	public void setMainActivityTitle(String mainActivityTitle) {
		this.mainActivityTitle = mainActivityTitle;
	}

	public String getMainActivityImgUrl() {
		return mainActivityImgUrl;
	}

	public void setMainActivityImgUrl(String mainActivityImgUrl) {
		this.mainActivityImgUrl = mainActivityImgUrl;
	}

	public String getMainActivitytype() {
		return mainActivitytype;
	}

	public void setMainActivitytype(String mainActivitytype) {
		this.mainActivitytype = mainActivitytype;
	}

	public String getMainActivityTime() {
		return mainActivityTime;
	}

	public void setMainActivityTime(String mainActivityTime) {
		this.mainActivityTime = mainActivityTime;
	}

	public String getMainActivityAddress() {
		return mainActivityAddress;
	}

	public void setMainActivityAddress(String mainActivityAddress) {
		this.mainActivityAddress = mainActivityAddress;
	}

	public String getActivityPartipateNum() {
		return activityPartipateNum;
	}

	public void setActivityPartipateNum(String activityPartipateNum) {
		this.activityPartipateNum = activityPartipateNum;
	}

	public String getActivityInterestNum() {
		return activityInterestNum;
	}

	public void setActivityInterestNum(String activityInterestNum) {
		this.activityInterestNum = activityInterestNum;
	}


}
